<?php

namespace App\Repositories\Transformers;

use App\Models\Activity;
use League\Fractal\TransformerAbstract;

class ActivityTransformer extends TransformerAbstract
{
    public function transform(Activity $activity)
    {
        return [
            'id' => $activity->id,
            'title' => $activity->title,
            'image' => $activity->image,
            'content' => html_entity_decode($activity->content),
            'sign_up_start' => $activity->sign_up_start,
            'sign_up_end' => $activity->sign_up_end,
            'activity_time_start' => $activity->activity_time_start,
            'activity_time_end' => $activity->activity_time_end,
            'address' => $activity->address,
            'limit_count' => $activity->limit_count,
            'limit_age' => $activity->limit_age,
            'cost' => $activity->cost,
            'status' => $activity->status,
        ];
    }
}
